package com.firword.common.domain.base;

/**
 * @author: jingyajun
 * @date: 2020/9/27
 * @description: 下拉框实体类
 * @since:
 */
public class Combobox implements Comparable<Combobox> {

    @Override
    public int compareTo(Combobox o) {
        if (o == null) {
            return 1;
        }
        if (this.getOrder() == null && o.getOrder() == null) {
            return 0;
        }
        if (this.getOrder() == null) {
            return -1;
        }
        if (o.getOrder() == null) {
            return 1;
        }
        return this.getOrder().compareTo(o.getOrder());
    }

    private String text;
    private String value;
    private Integer order;

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public Integer getOrder() {
        return order;
    }

    public void setOrder(Integer order) {
        this.order = order;
    }
}
